 
 function getOnlineTask(login_id,parseFunc) {
	$.ajax({ 
		type: "post", 
		url: "/service/", 
		dataType: "json", 
		async:true,
		data: {"act": "gettask","login_id": login_id},
		success: function (data,textStatus) { 
			if(data != null && parseFunc != null)
			{
				parseFunc(data);
			}
		}, 
		 complete:function(XMLHttpRequest,textStatus){  
					if(XMLHttpRequest.readyState=="4"){  
						//alert(XMLHttpRequest.responseText);  
					}  
			},  		
		error: function (XMLHttpRequest, textStatus, errorThrown) { 
			//$("#StatusArea").append("[state: " + textStatus + ", error: " + errorThrown + " ]<br/>");
			if (textStatus == "timeout") { // 请求超时
				// 其他错误，如网络错误等
				} else { 

				}
		} 
	});
}

function getTaskParse(result){
	//document.getElementById("task_list").innerHTML = "";
	$("#task_list").text("");
	 for (var i = 0; i < result.length; i++) {
		 var data= result[ i ];
		var url = "/service/?act=webmsg&sid="+data.Sid+"&peer_sid="+data.Peer_sid;
		var html = "<li><a href='#' onclick=\"openTab('"+data.Peer_sid+"','"+ url + "')\">" +data.Peer_sid;
		if(data.Msgcount >0){
			html += "<span style = 'color: #ff0000'>("+ data.Msgcount + ")</span>"; 
		}
		html += "</a> </li>";
		$("#task_list").append(html);
	}
}